Skip to main content

All Questions

1vote
2answers
59views

How to set @Url.Content for an image in AngularJs MVC Application

I am trying to upload an image and display it in my application. I am working in AngularJS, MVC and Web APi. My Image uploads successfully to a folder. Issue is: After uploading I send back relative ...
Maryam's user avatar
0votes
0answers
62views

Ninject Not Resolving Web API Dependency Injection

I have the following two classes. The ninject web common: public static class NinjectWebCommon { private static readonly Bootstrapper bootstrapper = new Bootstrapper(); /// <summary&...
Hasan Shouman's user avatar
0votes
0answers
605views

How to hide a Model property for certain users?

I am building an API that will serve users with different administration levels (roles) I have the following model (redacted for brevity) public class Job { public Guid JobId { get; set; } ...
Shant Hagopian's user avatar
0votes
1answer
103views

Send value from view to ActionResult controller

I am trying to pass value of < li > element from one partial view to ActionResult in controller and update second partial view with filtered result on the base of chosen < li > value. My ...
Atanas's user avatar
1vote
1answer
1kviews

C# dotAPNS push notification stops work on server and need to restart server to make it working

I tried this code to sent push notification in iOS and it's working but only for some duration and then it is not responding from var response = apns.SendAsync(push).Result; and if I need to sent ...
Pummy Kumari's user avatar
0votes
0answers
94views

Script file not loading on Razor page in one environment

I have a Razor page that calls a script file to execute a script and that script makes a call to an API to validate email address. Recently I have made few changes to the script and added CSRF token ...
user615611's user avatar
0votes
1answer
80views

Is there any way where I can set user information into Session values from cookies while rendering a controller in MVC?

I have tried in Global.asax.cs protected void Application_BeginRequest(object sender, EventArgs e) { try { var cookiesDataUserinfo = HttpContext.Current....
SYED NAWAZ PRINCE's user avatar
2votes
1answer
1kviews

Custom Validation Attribute not validating on Model - WebAPI C# and JSON

I have created a Model and a custom validation attribute to ensure that the value is greater than zero. The issue that I'm having is that the constructor of the custom attribute is hit, but the ...
dn238608's user avatar
-1votes
1answer
33views

getting error using partial view(@Html.Partial("SchemeDetails")) System.Collections.Generic.IEnumerable`1[MutualFund.Models.SchemeClass]'

In index.cshtml I added the SchemeDetails.cshtml by using a partial view, via @Html.Partial("SchemeDetails") I'm getting this error: model item passed into the dictionary is of type 'System....
Shafiq Ahamed's user avatar
0votes
2answers
74views

C# MVVM ASP.net API implicit conversion error

New to web app API's and trying to build a web app that exposes data from our DWH environment to the application via an API. My models: bed_data_dbconnect - context model: using Microsoft....
jimmy8ball's user avatar
0votes
0answers
206views

Why User.Identity.GetUserId() Web Api 2 method is not working with myController?

I have 2 controller AccountController //api controller MyController //normal controller When I call api controller (Account controller), I can get an UserID. Which means user logged In already, ...
Liam neesan's user avatar
0votes
2answers
1kviews

Using a controller with WEB API Routing

In my project (Asp.net MVC), I want to use DevExtreme GridView to display my data. I've used code first to create databases and tables. In the project, I have a model with the name of Member. I did ...
Piroozman's user avatar
0votes
1answer
806views

mvc controllers should only prepare data and pass it to an appropriate service method call [closed]

Please tell if this is a correct statement: "Mvc controller's method should have only one call to an appropriate service method, all other statement should just arrange data which is going to be ...
throwaway_jonny's user avatar
1vote
1answer
820views

How can i override default message Authorization has been denied for this request

How can i change the default response message with a custom one in MVC WebApi? { "Message": "Authorization has been denied for this request." } Thanks in advance This is my custom ResponseModel ...
Gianmarco Varriale's user avatar
0votes
0answers
44views

Project doesn`t have access to referenced project in the c# solution

I'm trying to access a method from a class which is in another project but in the same solution. The problem i face is that it keeps saying that i'm missing a reference even when i'm using the using ...
Csibi Norbert's user avatar

153050per page
close